package org.shaka.db.sqlbuilder.tables;

import java.util.Arrays;
import java.util.List;

import org.shaka.db.sqlbuilder.component.Column;
import org.shaka.db.sqlbuilder.component.Table;

public class Unit extends Table {
    public static final Column id = new Column("id");
    public static final Column branchId = new Column("branch_id");
    public static final Column name = new Column("name");
    public static final Column type = new Column("type");

    public static final Unit table = new Unit();

    private Unit() {
        super(null, "unit");
        addJoinLinkInfo(UserUnitRole.table, PairColumns.valueOf(id, UserUnitRole.unitId));
    }

    @Override
    public List<Column> primaryKeys() {
        return Arrays.asList(id);
    }

    @Override
    public List<Column> columns() {
        return Arrays.asList(id, branchId, name, type);
    }
}
